3.114 \(\int \frac{c+d x}{(a+a \sin (e+f x))^2} \, dx\)

Optimal. Leaf size=148 \[ -\frac{(c+d x) \cot \left (\frac{e}{2}+\frac{f x}{2}+\frac{\pi }{4}\right )}{3 a^2 f}-\frac{(c+d x) \cot \left (\frac{e}{2}+\frac{f x}{2}+\frac{\pi }{4}\right ) \csc ^2\left (\frac{e}{2}+\frac{f x}{2}+\frac{\pi }{4}\right )}{6 a^2 f}-\frac{d \csc ^2\left (\frac{e}{2}+\frac{f x}{2}+\frac{\pi }{4}\right )}{6 a^2 f^2}+\frac{2 d \log \left (\sin \left (\frac{e}{2}+\frac{f x}{2}+\frac{\pi }{4}\right )\right )}{3 a^2 f^2} \]

[Out]

-((c + d*x)*Cot[e/2 + Pi/4 + (f*x)/2])/(3*a^2*f) - (d*Csc[e/2 + Pi/4 + (f*x)/2]^2)/(6*a^2*f^2) - ((c + d*x)*Co
t[e/2 + Pi/4 + (f*x)/2]*Csc[e/2 + Pi/4 + (f*x)/2]^2)/(6*a^2*f) + (2*d*Log[Sin[e/2 + Pi/4 + (f*x)/2]])/(3*a^2*f
^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0891686, antiderivative size = 148, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {3318, 4185, 4184, 3475} \[ -\frac{(c+d x) \cot \left (\frac{e}{2}+\frac{f x}{2}+\frac{\pi }{4}\right )}{3 a^2 f}-\frac{(c+d x) \cot \left (\frac{e}{2}+\frac{f x}{2}+\frac{\pi }{4}\right ) \csc ^2\left (\frac{e}{2}+\frac{f x}{2}+\frac{\pi }{4}\right )}{6 a^2 f}-\frac{d \csc ^2\left (\frac{e}{2}+\frac{f x}{2}+\frac{\pi }{4}\right )}{6 a^2 f^2}+\frac{2 d \log \left (\sin \left (\frac{e}{2}+\frac{f x}{2}+\frac{\pi }{4}\right )\right )}{3 a^2 f^2} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)/(a + a*Sin[e + f*x])^2,x]

[Out]

-((c + d*x)*Cot[e/2 + Pi/4 + (f*x)/2])/(3*a^2*f) - (d*Csc[e/2 + Pi/4 + (f*x)/2]^2)/(6*a^2*f^2) - ((c + d*x)*Co
t[e/2 + Pi/4 + (f*x)/2]*Csc[e/2 + Pi/4 + (f*x)/2]^2)/(6*a^2*f) + (2*d*Log[Sin[e/2 + Pi/4 + (f*x)/2]])/(3*a^2*f
^2)

Rule 3318

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(2*a)^n, Int[(c
 + d*x)^m*Sin[(1*(e + (Pi*a)/(2*b)))/2 + (f*x)/2]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2
- b^2, 0] && IntegerQ[n] && (GtQ[n, 0] || IGtQ[m, 0])

Rule 4185

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((c_.) + (d_.)*(x_)), x_Symbol] :> -Simp[(b^2*(c + d*x)*Cot[e + f*x]*
(b*Csc[e + f*x])^(n - 2))/(f*(n - 1)), x] + (Dist[(b^2*(n - 2))/(n - 1), Int[(c + d*x)*(b*Csc[e + f*x])^(n - 2
), x], x] - Simp[(b^2*d*(b*Csc[e + f*x])^(n - 2))/(f^2*(n - 1)*(n - 2)), x]) /; FreeQ[{b, c, d, e, f}, x] && G
tQ[n, 1] && NeQ[n, 2]

Rule 4184

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp[((c + d*x)^m*Cot[e + f*x])/f, x]
+ Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{c+d x}{(a+a \sin (e+f x))^2} \, dx &=\frac{\int (c+d x) \csc ^4\left (\frac{1}{2} \left (e+\frac{\pi }{2}\right )+\frac{f x}{2}\right ) \, dx}{4 a^2}\\ &=-\frac{d \csc ^2\left (\frac{e}{2}+\frac{\pi }{4}+\frac{f x}{2}\right )}{6 a^2 f^2}-\frac{(c+d x) \cot \left (\frac{e}{2}+\frac{\pi }{4}+\frac{f x}{2}\right ) \csc ^2\left (\frac{e}{2}+\frac{\pi }{4}+\frac{f x}{2}\right )}{6 a^2 f}+\frac{\int (c+d x) \csc ^2\left (\frac{e}{2}+\frac{\pi }{4}+\frac{f x}{2}\right ) \, dx}{6 a^2}\\ &=-\frac{(c+d x) \cot \left (\frac{e}{2}+\frac{\pi }{4}+\frac{f x}{2}\right )}{3 a^2 f}-\frac{d \csc ^2\left (\frac{e}{2}+\frac{\pi }{4}+\frac{f x}{2}\right )}{6 a^2 f^2}-\frac{(c+d x) \cot \left (\frac{e}{2}+\frac{\pi }{4}+\frac{f x}{2}\right ) \csc ^2\left (\frac{e}{2}+\frac{\pi }{4}+\frac{f x}{2}\right )}{6 a^2 f}+\frac{d \int \cot \left (\frac{e}{2}+\frac{\pi }{4}+\frac{f x}{2}\right ) \, dx}{3 a^2 f}\\ &=-\frac{(c+d x) \cot \left (\frac{e}{2}+\frac{\pi }{4}+\frac{f x}{2}\right )}{3 a^2 f}-\frac{d \csc ^2\left (\frac{e}{2}+\frac{\pi }{4}+\frac{f x}{2}\right )}{6 a^2 f^2}-\frac{(c+d x) \cot \left (\frac{e}{2}+\frac{\pi }{4}+\frac{f x}{2}\right ) \csc ^2\left (\frac{e}{2}+\frac{\pi }{4}+\frac{f x}{2}\right )}{6 a^2 f}+\frac{2 d \log \left (\sin \left (\frac{e}{2}+\frac{\pi }{4}+\frac{f x}{2}\right )\right )}{3 a^2 f^2}\\ \end{align*}

Mathematica [A]  time = 1.08169, size = 225, normalized size = 1.52 \[ -\frac{\left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right ) \left (\cos \left (\frac{3}{2} (e+f x)\right ) \left (2 c f+2 d \log \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )-d e+d f x\right )+2 \sin \left (\frac{1}{2} (e+f x)\right ) \left (-3 c f+d \cos (e+f x) \left (-2 \log \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )+e+f x\right )-4 d \log \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )+2 d e-d f x+d\right )+d \cos \left (\frac{1}{2} (e+f x)\right ) \left (-6 \log \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )+3 e+3 f x+2\right )\right )}{6 a^2 f^2 (\sin (e+f x)+1)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)/(a + a*Sin[e + f*x])^2,x]

[Out]

-((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(d*Cos[(e + f*x)/2]*(2 + 3*e + 3*f*x - 6*Log[Cos[(e + f*x)/2] + Sin[(e
 + f*x)/2]]) + Cos[(3*(e + f*x))/2]*(-(d*e) + 2*c*f + d*f*x + 2*d*Log[Cos[(e + f*x)/2] + Sin[(e + f*x)/2]]) +
2*(d + 2*d*e - 3*c*f - d*f*x + d*Cos[e + f*x]*(e + f*x - 2*Log[Cos[(e + f*x)/2] + Sin[(e + f*x)/2]]) - 4*d*Log
[Cos[(e + f*x)/2] + Sin[(e + f*x)/2]])*Sin[(e + f*x)/2]))/(6*a^2*f^2*(1 + Sin[e + f*x])^2)

________________________________________________________________________________________

Maple [B]  time = 0.197, size = 233, normalized size = 1.6 \begin{align*} -2\,{\frac{c}{{a}^{2}f \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) }}-{\frac{4\,c}{3\,{a}^{2}f} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) ^{-3}}+2\,{\frac{c}{{a}^{2}f \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) ^{2}}}-{\frac{2\,dx}{3\,{a}^{2}f} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) ^{-3}}+{\frac{2\,d}{3\,{a}^{2}{f}^{2}}\tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) ^{-3}}+{\frac{2\,d}{3\,{a}^{2}{f}^{2}} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{2} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) ^{-3}}+{\frac{2\,dx}{3\,{a}^{2}f} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{3} \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) ^{-3}}+{\frac{2\,d}{3\,{a}^{2}{f}^{2}}\ln \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) +1 \right ) }-{\frac{d}{3\,{a}^{2}{f}^{2}}\ln \left ( 1+ \left ( \tan \left ({\frac{fx}{2}}+{\frac{e}{2}} \right ) \right ) ^{2} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)/(a+a*sin(f*x+e))^2,x)

[Out]

-2/a^2*c/f/(tan(1/2*f*x+1/2*e)+1)-4/3/a^2*c/f/(tan(1/2*f*x+1/2*e)+1)^3+2/a^2*c/f/(tan(1/2*f*x+1/2*e)+1)^2-2/3/
a^2/(tan(1/2*f*x+1/2*e)+1)^3/f*x*d+2/3/a^2/(tan(1/2*f*x+1/2*e)+1)^3*d/f^2*tan(1/2*f*x+1/2*e)+2/3/a^2/(tan(1/2*
f*x+1/2*e)+1)^3*d/f^2*tan(1/2*f*x+1/2*e)^2+2/3/a^2/(tan(1/2*f*x+1/2*e)+1)^3/f*x*d*tan(1/2*f*x+1/2*e)^3+2/3/a^2
*d/f^2*ln(tan(1/2*f*x+1/2*e)+1)-1/3/a^2*d/f^2*ln(1+tan(1/2*f*x+1/2*e)^2)

________________________________________________________________________________________

Maxima [B]  time = 1.05719, size = 1229, normalized size = 8.3 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+a*sin(f*x+e))^2,x, algorithm="maxima")

[Out]

1/3*(2*d*e*(3*sin(f*x + e)/(cos(f*x + e) + 1) + 3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 2)/(a^2*f + 3*a^2*f*si
n(f*x + e)/(cos(f*x + e) + 1) + 3*a^2*f*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a^2*f*sin(f*x + e)^3/(cos(f*x +
e) + 1)^3) + (2*(f*x + 3*(f*x + e)*sin(f*x + e) + e + cos(f*x + e) + sin(2*f*x + 2*e))*cos(3*f*x + 3*e) - 2*(9
*(f*x + e)*cos(f*x + e) - 6*sin(f*x + e) - 1)*cos(2*f*x + 2*e) - 6*cos(2*f*x + 2*e)^2 - 6*cos(f*x + e)^2 - (6*
(cos(f*x + e) + sin(2*f*x + 2*e))*cos(3*f*x + 3*e) - cos(3*f*x + 3*e)^2 + 6*(3*sin(f*x + e) + 1)*cos(2*f*x + 2
*e) - 9*cos(2*f*x + 2*e)^2 - 9*cos(f*x + e)^2 - 2*(3*cos(2*f*x + 2*e) - 3*sin(f*x + e) - 1)*sin(3*f*x + 3*e) -
 sin(3*f*x + 3*e)^2 - 18*cos(f*x + e)*sin(2*f*x + 2*e) - 9*sin(2*f*x + 2*e)^2 - 9*sin(f*x + e)^2 - 6*sin(f*x +
 e) - 1)*log(cos(f*x + e)^2 + sin(f*x + e)^2 + 2*sin(f*x + e) + 1) - 2*(3*(f*x + e)*cos(f*x + e) + cos(2*f*x +
 2*e) - sin(f*x + e))*sin(3*f*x + 3*e) - 6*(f*x + 3*(f*x + e)*sin(f*x + e) + e + 2*cos(f*x + e))*sin(2*f*x + 2
*e) - 6*sin(2*f*x + 2*e)^2 - 6*sin(f*x + e)^2 - 2*sin(f*x + e))*d/(a^2*f*cos(3*f*x + 3*e)^2 + 9*a^2*f*cos(2*f*
x + 2*e)^2 + 9*a^2*f*cos(f*x + e)^2 + a^2*f*sin(3*f*x + 3*e)^2 + 18*a^2*f*cos(f*x + e)*sin(2*f*x + 2*e) + 9*a^
2*f*sin(2*f*x + 2*e)^2 + 9*a^2*f*sin(f*x + e)^2 + 6*a^2*f*sin(f*x + e) + a^2*f - 6*(a^2*f*cos(f*x + e) + a^2*f
*sin(2*f*x + 2*e))*cos(3*f*x + 3*e) - 6*(3*a^2*f*sin(f*x + e) + a^2*f)*cos(2*f*x + 2*e) + 2*(3*a^2*f*cos(2*f*x
 + 2*e) - 3*a^2*f*sin(f*x + e) - a^2*f)*sin(3*f*x + 3*e)) - 2*c*(3*sin(f*x + e)/(cos(f*x + e) + 1) + 3*sin(f*x
 + e)^2/(cos(f*x + e) + 1)^2 + 2)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 3*a^2*sin(f*x + e)^2/(cos(f*x
 + e) + 1)^2 + a^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3))/f

________________________________________________________________________________________

Fricas [A]  time = 1.68312, size = 495, normalized size = 3.34 \begin{align*} \frac{d f x +{\left (d f x + c f\right )} \cos \left (f x + e\right )^{2} + c f +{\left (2 \, d f x + 2 \, c f + d\right )} \cos \left (f x + e\right ) +{\left (d \cos \left (f x + e\right )^{2} - d \cos \left (f x + e\right ) -{\left (d \cos \left (f x + e\right ) + 2 \, d\right )} \sin \left (f x + e\right ) - 2 \, d\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) -{\left (d f x + c f -{\left (d f x + c f\right )} \cos \left (f x + e\right ) - d\right )} \sin \left (f x + e\right ) + d}{3 \,{\left (a^{2} f^{2} \cos \left (f x + e\right )^{2} - a^{2} f^{2} \cos \left (f x + e\right ) - 2 \, a^{2} f^{2} -{\left (a^{2} f^{2} \cos \left (f x + e\right ) + 2 \, a^{2} f^{2}\right )} \sin \left (f x + e\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+a*sin(f*x+e))^2,x, algorithm="fricas")

[Out]

1/3*(d*f*x + (d*f*x + c*f)*cos(f*x + e)^2 + c*f + (2*d*f*x + 2*c*f + d)*cos(f*x + e) + (d*cos(f*x + e)^2 - d*c
os(f*x + e) - (d*cos(f*x + e) + 2*d)*sin(f*x + e) - 2*d)*log(sin(f*x + e) + 1) - (d*f*x + c*f - (d*f*x + c*f)*
cos(f*x + e) - d)*sin(f*x + e) + d)/(a^2*f^2*cos(f*x + e)^2 - a^2*f^2*cos(f*x + e) - 2*a^2*f^2 - (a^2*f^2*cos(
f*x + e) + 2*a^2*f^2)*sin(f*x + e))

________________________________________________________________________________________

Sympy [A]  time = 2.56087, size = 1246, normalized size = 8.42 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+a*sin(f*x+e))**2,x)

[Out]

Piecewise((6*c*f*tan(e/2 + f*x/2)**3/(9*a**2*f**2*tan(e/2 + f*x/2)**3 + 27*a**2*f**2*tan(e/2 + f*x/2)**2 + 27*
a**2*f**2*tan(e/2 + f*x/2) + 9*a**2*f**2) - 6*c*f/(9*a**2*f**2*tan(e/2 + f*x/2)**3 + 27*a**2*f**2*tan(e/2 + f*
x/2)**2 + 27*a**2*f**2*tan(e/2 + f*x/2) + 9*a**2*f**2) + 6*d*f*x*tan(e/2 + f*x/2)**3/(9*a**2*f**2*tan(e/2 + f*
x/2)**3 + 27*a**2*f**2*tan(e/2 + f*x/2)**2 + 27*a**2*f**2*tan(e/2 + f*x/2) + 9*a**2*f**2) - 6*d*f*x/(9*a**2*f*
*2*tan(e/2 + f*x/2)**3 + 27*a**2*f**2*tan(e/2 + f*x/2)**2 + 27*a**2*f**2*tan(e/2 + f*x/2) + 9*a**2*f**2) + 6*d
*log(tan(e/2 + f*x/2) + 1)*tan(e/2 + f*x/2)**3/(9*a**2*f**2*tan(e/2 + f*x/2)**3 + 27*a**2*f**2*tan(e/2 + f*x/2
)**2 + 27*a**2*f**2*tan(e/2 + f*x/2) + 9*a**2*f**2) + 18*d*log(tan(e/2 + f*x/2) + 1)*tan(e/2 + f*x/2)**2/(9*a*
*2*f**2*tan(e/2 + f*x/2)**3 + 27*a**2*f**2*tan(e/2 + f*x/2)**2 + 27*a**2*f**2*tan(e/2 + f*x/2) + 9*a**2*f**2)
+ 18*d*log(tan(e/2 + f*x/2) + 1)*tan(e/2 + f*x/2)/(9*a**2*f**2*tan(e/2 + f*x/2)**3 + 27*a**2*f**2*tan(e/2 + f*
x/2)**2 + 27*a**2*f**2*tan(e/2 + f*x/2) + 9*a**2*f**2) + 6*d*log(tan(e/2 + f*x/2) + 1)/(9*a**2*f**2*tan(e/2 +
f*x/2)**3 + 27*a**2*f**2*tan(e/2 + f*x/2)**2 + 27*a**2*f**2*tan(e/2 + f*x/2) + 9*a**2*f**2) - 3*d*log(tan(e/2
+ f*x/2)**2 + 1)*tan(e/2 + f*x/2)**3/(9*a**2*f**2*tan(e/2 + f*x/2)**3 + 27*a**2*f**2*tan(e/2 + f*x/2)**2 + 27*
a**2*f**2*tan(e/2 + f*x/2) + 9*a**2*f**2) - 9*d*log(tan(e/2 + f*x/2)**2 + 1)*tan(e/2 + f*x/2)**2/(9*a**2*f**2*
tan(e/2 + f*x/2)**3 + 27*a**2*f**2*tan(e/2 + f*x/2)**2 + 27*a**2*f**2*tan(e/2 + f*x/2) + 9*a**2*f**2) - 9*d*lo
g(tan(e/2 + f*x/2)**2 + 1)*tan(e/2 + f*x/2)/(9*a**2*f**2*tan(e/2 + f*x/2)**3 + 27*a**2*f**2*tan(e/2 + f*x/2)**
2 + 27*a**2*f**2*tan(e/2 + f*x/2) + 9*a**2*f**2) - 3*d*log(tan(e/2 + f*x/2)**2 + 1)/(9*a**2*f**2*tan(e/2 + f*x
/2)**3 + 27*a**2*f**2*tan(e/2 + f*x/2)**2 + 27*a**2*f**2*tan(e/2 + f*x/2) + 9*a**2*f**2) - 2*d*tan(e/2 + f*x/2
)**3/(9*a**2*f**2*tan(e/2 + f*x/2)**3 + 27*a**2*f**2*tan(e/2 + f*x/2)**2 + 27*a**2*f**2*tan(e/2 + f*x/2) + 9*a
**2*f**2) - 2*d/(9*a**2*f**2*tan(e/2 + f*x/2)**3 + 27*a**2*f**2*tan(e/2 + f*x/2)**2 + 27*a**2*f**2*tan(e/2 + f
*x/2) + 9*a**2*f**2), Ne(f, 0)), ((c*x + d*x**2/2)/(a*sin(e) + a)**2, True))

________________________________________________________________________________________

Giac [B]  time = 1.83268, size = 4177, normalized size = 28.22 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/(a+a*sin(f*x+e))^2,x, algorithm="giac")

[Out]

-1/3*(2*d*f*x*tan(1/2*f*x)^3*tan(1/2*e)^3 + 2*c*f*tan(1/2*f*x)^3*tan(1/2*e)^3 - d*log(2*(tan(1/2*e)^2 + 1)/(ta
n(1/2*f*x)^4*tan(1/2*e)^2 - 2*tan(1/2*f*x)^4*tan(1/2*e) - 2*tan(1/2*f*x)^3*tan(1/2*e)^2 + tan(1/2*f*x)^4 + 2*t
an(1/2*f*x)^2*tan(1/2*e)^2 + 2*tan(1/2*f*x)^3 - 2*tan(1/2*f*x)*tan(1/2*e)^2 + 2*tan(1/2*f*x)^2 + tan(1/2*e)^2
+ 2*tan(1/2*f*x) + 2*tan(1/2*e) + 1))*tan(1/2*f*x)^3*tan(1/2*e)^3 - 6*d*f*x*tan(1/2*f*x)^2*tan(1/2*e)^2 + 3*d*
log(2*(tan(1/2*e)^2 + 1)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